﻿using System;

namespace LCP_06_na_ying_bi
{
    class Program
    {
        static void Main (string[] args)
        {
            int[] coins = new int[] {8, 3, 1 };
            Console.WriteLine (MinCount (coins));
        }

        public static int MinCount (int[] coins)
        {
            int count = 0;
            for (int i = 0;i < coins.Length;i++)
            {
                count += coins[i] % 2 > 0 ? coins[i] / 2 + 1 : coins[i] / 2;
            }
            return count;
        }
    }
}
